<!doctype>
<html>
<head>
	<title>jsPDF</title>
	<style type="text/css">
		* { padding: 0; margin: 0; }
		body {
			padding: 30px;
			font-family: Arial, Helvetica, sans-serif;
		}
		h1 {
			margin-bottom: 1em;
			border-bottom: 1px solid #ccc;
		}
		
		h2 {
			margin-bottom: 1em;
			border-bottom: 1px solid #ccc;
		}
		
		pre {
			border: 1px dotted #ccc;
			background: #f7f7f7;
			padding: 10px;
			margin-bottom: 1em;
		}
        
        h1 {
            margin-bottom: 0em;
        }
        
        h2 {
            margin-top: 1em;
        }
	</style>
	<script type="text/javascript" src="../libs/base64.js"></script>
	<script type="text/javascript" src="../libs/sprintf.js"></script>
	<script type="text/javascript" src="../jspdf.js"></script>
</head>

<body>

<h1>jsPDF Demo</h1>

<h2>Simple Two-page Text Document</h2>
<pre>jsPDF.init();
jsPDF.addPage();
jsPDF.text(20, 20, 'Hello world!');
jsPDF.text(20, 30, 'This is client-side Javascript, pumping out a PDF.');
jsPDF.addPage();
jsPDF.text(20, 20, 'Do you like that?');

// Making Data URI
var out = jsPDF.output();
var url = 'data:application/pdf;base64,' + Base64.encode(out);
document.location.href = url;</pre>
<a href="javascript:demo1()">Run Code</a>

<script type="text/javascript">

function demo1() {
	jsPDF.init();
	jsPDF.addPage();
	jsPDF.text(20, 20, 'Hello world!');
	jsPDF.text(20, 30, 'This is client-side Javascript, pumping out a PDF.');
	jsPDF.addPage();
	jsPDF.text(20, 20, 'Do you like that?');
	
	// Making Data URI
	var out = jsPDF.output();
	var url = 'data:application/pdf;base64,' + Base64.encode(out);
	document.location.href = url;
}

</script>


<h2>Fundraiser for Version 1</h2>

<p>If you like the look of where this is going then please see <strong><a href="http://www.fundable.com/groupactions/groupaction.2009-04-23.4260294590">my fundable page</a></strong> for features I'm working on. jsPDF is open source and your pledge - however small - will be much appreciated!</p>

<p></p>

<script type="text/javascript">
// Google Analytics

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-2746979-4");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html>